package com.chu.controller;

import com.chu.entity.OrgRole;
import com.chu.enums.PageEnum;
import com.chu.service.OrgRoleService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
public class OrgRoleController {

    @Autowired
    private OrgRoleService orgRoleService;
    //分页查询所有角色信息
    @RequestMapping("/resource/demo3/orgRoleService")
    public String jobInstall(@RequestParam(defaultValue = "1")int page, ModelMap map, String name, String deptname, String  state){

//        PageInfo<OrgRole> pageInfo =
//                orgRoleService.findAllOrgRole( page, PageEnum.SIZE.getSize(), name, deptname, state);
//        System.out.println(name+".......>>>>>>>");
//        System.out.println(deptname+"....>>>>>>>>>>");
//        System.out.println(state+"........>>>>>>>>>");
//        map.addAttribute("pageInfo",pageInfo);
//        map.addAttribute("name",name);
//        map.addAttribute("deptname",deptname);
//        map.addAttribute("state",state);

        return "resource/demo3/list";
    }
}
